package com.ruoyi.zxjd.work.controller;

import java.util.List;
import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import com.ruoyi.zxjd.work.domain.WorkHandle;
import com.ruoyi.zxjd.work.service.IWorkHandleService;
import com.ruoyi.common.core.controller.BaseController;
import com.ruoyi.common.core.page.TableDataInfo;

/**
 * 工作处理Controller
 * 
 * @author lcc
 * @date 2021-03-08
 */
@Controller
@RequestMapping("/work/handle")
public class WorkHandleController extends BaseController
{
    private String prefix = "work/handle";

    @Autowired
    private IWorkHandleService workHandleService;

    @RequiresPermissions("work:handle:view")
    @GetMapping()
    public String handle()
    {
        return prefix + "/handle";
    }

    /**
     * 查询工作处理列表
     */
    @RequiresPermissions("work:handle:list")
    @PostMapping("/list")
    @ResponseBody
    public TableDataInfo list(WorkHandle workHandle)
    {
        startPage();
        List<WorkHandle> list = workHandleService.selectWorkHandleList(workHandle);
        return getDataTable(list);
    }
}
